import request from '@/server/request';

// 获取任务列表
export function getTaskTable(data, url) {
  return request({
    url,
    method: 'post',
    data
  });
}

export function getTaskInfo(data) {
  return request({
    url: '/taskLibrary/taskDetail',
    method: 'post',
    data
  });
}

// 获取移动端首页数据
export function getHomeSummery(data) {
  return request({
    url: '/taskLibrary/homeSummery',
    method: 'post',
    data
  });
}

// 完成任务
export function taskEnd(data, headers) {
  return request({
    url: '/taskLibrary/approval',
    data,
    method: 'post',
    headers
  });
}

// 获取获取审批记录列表
export function approvalList(data) {
  return request({
    url: '/taskLibrary/approvalList',
    method: 'post',
    data
  });
}

export function getList(data) {
  return request({
    url: '/menu/getList',
    method: 'post',
    data
  });
}
